#include <stdio.h>
#include "func.c"

int main(int argc, char *argv[])
{
    FILE *fp;
    int num;
    char rec[256];
    // 以读的方式打开文件
    if((fp = fopen(argv[1], "r")) == NULL || argc != 3)
    {
        printf("Usage: ./%s file number\n", argv[0]);
        exit(1);
    }
    else
    {
        read_by_fp_and_num(rec, fp, atoi(argv[2]));
    }
    return 0;
}